<!DOCTYPE HTML>
<html>
<head>
  <title>Test for mozaudiochannel</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>

<pre id="test">
<script type="application/javascript">

SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [["media.useAudioChannelAPI", true]]}, function() {
  var ifr = document.createElement('iframe');
  ifr.src = 'file_mozaudiochannel.html';
  onmessage = function(e) {
    if ("finish" in e.data) {
      SimpleTest.finish();
    } else {
      ok(e.data.status, e.data.msg);
    }
  }

  document.body.appendChild(ifr);
});
</script>
</pre>
</body>
</html>
